package com.dower.clothing.service.impl;

import java.util.List;

import com.dower.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dower.clothing.mapper.ClothingTypeMapper;
import com.dower.clothing.domain.ClothingType;
import com.dower.clothing.service.IClothingTypeService;


/**
 * 服装类型字典Service业务层处理
 * 
 * @author dower
 * @date 2020-08-26
 */
@Service
public class ClothingTypeServiceImpl implements IClothingTypeService 
{
    @Autowired
    private ClothingTypeMapper clothingTypeMapper;

    /**
     * 查询服装类型字典
     * 
     * @param numId 服装类型字典ID
     * @return 服装类型字典
     */
    @Override
    public ClothingType selectClothingTypeById(Long numId)
    {
        return clothingTypeMapper.selectClothingTypeById(numId);
    }

    /**
     * 查询服装类型字典列表
     * 
     * @param clothingType 服装类型字典
     * @return 服装类型字典
     */
    @Override
    public List<ClothingType> selectClothingTypeList(ClothingType clothingType)
    {
        return clothingTypeMapper.selectClothingTypeList(clothingType);
    }

    /**
     * 新增服装类型字典
     * 
     * @param clothingType 服装类型字典
     * @return 结果
     */
    @Override
    public int insertClothingType(ClothingType clothingType)
    {
        return clothingTypeMapper.insertClothingType(clothingType);
    }

    /**
     * 修改服装类型字典
     * 
     * @param clothingType 服装类型字典
     * @return 结果
     */
    @Override
    public int updateClothingType(ClothingType clothingType)
    {
        return clothingTypeMapper.updateClothingType(clothingType);
    }

    /**
     * 删除服装类型字典对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteClothingTypeByIds(String ids)
    {
        return clothingTypeMapper.deleteClothingTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除服装类型字典信息
     * 
     * @param numId 服装类型字典ID
     * @return 结果
     */
    @Override
    public int deleteClothingTypeById(Long numId)
    {
        return clothingTypeMapper.deleteClothingTypeById(numId);
    }
}
